Skip to content

[Core] Support token auth in ray Pub-Sub#58333

Merged
edoakes merged 40 commits intomasterfrom
token_auth_2.5
Oct 31, 2025
Merged

[Core] Support token auth in ray Pub-Sub#58333
edoakes merged 40 commits intomasterfrom
token_auth_2.5

Conversation

@sampan-s-nayak
Copy link
Contributor

@sampan-s-nayak sampan-s-nayak commented Oct 31, 2025

##Description

This PR adds token-based authentication support to the PythonGcsSubscriber, which previously made direct gRPC calls via the stub without auth. The rest of the pub-sub layer already uses the shared gRPC infrastructure (GrpcServer, GrpcClient), which supports token authentication.

sampan and others added 30 commits October 23, 2025 16:17
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
sampan and others added 8 commits October 28, 2025 04:21
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
@sampan-s-nayak sampan-s-nayak requested a review from a team as a code owner October 31, 2025 02:27
@sampan-s-nayak sampan-s-nayak changed the title Token auth 2.5 [Core] Support token auth in ray Pub-Sub Oct 31, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces token-based authentication to PythonGcsSubscriber and adds a new RAY_USER_CHECK macro for improved user-facing error reporting. The changes are well-structured. PythonGcsSubscriber now correctly handles authentication tokens for Subscribe, Poll, and Close operations. A comprehensive test suite for various authentication scenarios has been added, which is great. The RAY_USER_CHECK macro is a valuable addition for distinguishing user configuration errors from internal Ray bugs, and its application to the token loading logic is appropriate. I have a few suggestions to further improve the code's clarity and correctness.

sampan added 2 commits October 31, 2025 02:34
Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: sampan <sampan@anyscale.com>
@ray-gardener ray-gardener bot added the core Issues that should be addressed in Ray Core label Oct 31, 2025
@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Oct 31, 2025
@edoakes edoakes enabled auto-merge (squash) October 31, 2025 12:49
@edoakes edoakes merged commit 08cad4c into master Oct 31, 2025
8 checks passed
@edoakes edoakes deleted the token_auth_2.5 branch October 31, 2025 14:06
YoussefEssDS pushed a commit to YoussefEssDS/ray that referenced this pull request Nov 8, 2025
This PR adds token-based authentication support to the
PythonGcsSubscriber, which previously made direct gRPC calls via the
stub without auth. The rest of the pub-sub layer already uses the shared
gRPC infrastructure (GrpcServer, GrpcClient), which supports token
authentication.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
This PR adds token-based authentication support to the
PythonGcsSubscriber, which previously made direct gRPC calls via the
stub without auth. The rest of the pub-sub layer already uses the shared
gRPC infrastructure (GrpcServer, GrpcClient), which supports token
authentication.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
This PR adds token-based authentication support to the
PythonGcsSubscriber, which previously made direct gRPC calls via the
stub without auth. The rest of the pub-sub layer already uses the shared
gRPC infrastructure (GrpcServer, GrpcClient), which supports token
authentication.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
This PR adds token-based authentication support to the
PythonGcsSubscriber, which previously made direct gRPC calls via the
stub without auth. The rest of the pub-sub layer already uses the shared
gRPC infrastructure (GrpcServer, GrpcClient), which supports token
authentication.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
This PR adds token-based authentication support to the
PythonGcsSubscriber, which previously made direct gRPC calls via the
stub without auth. The rest of the pub-sub layer already uses the shared
gRPC infrastructure (GrpcServer, GrpcClient), which supports token
authentication.

---------

Signed-off-by: sampan <sampan@anyscale.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: sampan <sampan@anyscale.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants